/* Extensions for jQuery */
(function() {
  //Create an event handler for every matched element in the selector
	if (jQuery) {
	  $.fn.subscribe = function(_pattern, _callback, _args) {
  	  return this.each(function() {
  	    args = pb.api.extend({
  	      element: this
  	    },_args||{});
  	    pb.sub(_pattern, _callback, args);
  	  });
  	};
	}
})();